﻿@using System.Web
@using System.Web.Optimization
@using BlogEngine.Core
@{
    App_Code.WebUtils.CheckRightsForAdminPagesPages(false);
    string loginUrl = Href(Utils.RelativeWebRoot + "Account/login.aspx");
    var userRights = Security.CurrentUserRights().Select(r => r.Flag).ToArray();
}
<html>
<head>
    <title>@BlogSettings.Instance.Name (@Security.CurrentMembershipUser.UserName)</title>
    <link rel="shortcut icon" href="@Href(Utils.ApplicationRelativeWebRoot + "pics/blogengine.ico")" type="image/x-icon" />
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    @Styles.Render("~/Content/css")
    <script type="text/javascript">
        if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
            var msViewportStyle = document.createElement("style");
            var mq = "@@-ms-viewport{width:auto!important}";
            msViewportStyle.appendChild(document.createTextNode(mq));
            document.getElementsByTagName("head")[0].appendChild(msViewportStyle);
        }
    </script>
</head>
<body>
    <script type="text/javascript">
        var SiteVars = {
            ApplicationRelativeWebRoot: '@Utils.ApplicationRelativeWebRoot',
            RelativeWebRoot: '@Utils.RelativeWebRoot',
            BlogInstanceId: '@Blog.CurrentInstance.Id',
            UserName: '@User.Identity.Name',
            UserRights: ['@Html.Raw(string.Join("', '", userRights))'],
            AbsoluteWebRoot: '@Utils.AbsoluteWebRoot',
            Version: 'BlogEngine.NET ' + '@BlogSettings.Instance.Version()',
            IsPrimary: '@Blog.CurrentInstance.IsPrimary',
            IsAdmin: '@Security.IsAdministrator',
            AppRoot: function (url) { window.location = '@Utils.ApplicationRelativeWebRoot' + url; return false; },
            BlogRoot: function (url) { window.location = '@Utils.RelativeWebRoot' + url; }
        };
    </script>
    <script type="text/javascript" src="admin.res.axd"></script>
    <div id="container" class="app-wrapper @Resources.labels.LangDirection">
        <div data-ng-app="blogAdmin" data-ng-view="" id="ng-view"></div>
    </div>
    @*<div data-ng-app="blogAdmin" data-ng-view="" id="ng-view" class="slide-animation"></div>*@
    @Scripts.Render("~/scripts/blogadmin")
</body>
</html>